<Script runat="server" >
  Public Sub Page_Load(sender As Object, e As EventArgs)
    ' Calculate the discount rate
    Dim discountRate As Single
    Dim productCost As Single

    ' Determine productCost value
    productCost = 19.99F

    ' Calculate discount rate and apply to product cost
    discountRate = CommerceApplication.discountRate
    productCost = productCost - (productCost * discountRate)

    ' Display calculation
    lblCost.Text = productCost.ToString()
 
  End Sub
</Script>

The cost of the product is: $<asp:label id="lblCost" runat="server" />
